
import pomelo from '../libs/pomelo';

interface SocketOpts {
    host: string,
    port: string,
    onConnect: Function
}

export const connect = (opts: SocketOpts) => {
    pomelo.init({
        host: opts.host,
        port: opts.port
    }, (socket) => {
        opts.onConnect && opts.onConnect(pomelo);
    })
}
